/**
 * Project hdmap
 * @author shengjialiang
 * @version v1.0
 */


#include "map_helper/App.h"
#include <io.h>
#include <windows.h>
#include <direct.h>
#include "map_helper/StringConverter.h"

/**
 * App implementation
 */

namespace Helper
{
    CApp::CApp()
    {

    }

    CApp::~CApp()
    {

    }

    std::string CApp::getAppDir()
    {
        TCHAR pszPath[512];
        memset(pszPath, 0, 512);
        ::GetModuleFileName(NULL, pszPath, 256);
        std::wstring str = pszPath;
        std::wstring::size_type pos = str.rfind('\\');
        std::wstring wDir = str.substr(0, pos);
        std::string appDir = CStringConverter::convert(wDir);

        return appDir;
    }
}